<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>demo1</title>
</head>
<body>
<div id="example-2">
    <ul>
        <todo-item :message="message"></todo-item>
        <todo-item-my></todo-item-my>
    </ul>
</div>
<script src="vue.js"></script>
<script>
    let app = new Vue({
        el: '#example-2',
        components: {
            'todo-item': {
                template: '<li>{{ message }}</li>',
                props:["message"]
            },
            'todo-item-my': {
                template: '<button v-on:click="count += 1">{{ count }}</button>',
                data: function(){
                    return {
                        count:1
                    }
                }
            }
        },
        data:{
            message:"Hello LZUGIS"
        }
    })
</script>
</body>
</html>